#pragma once
#include <stdint.h>
#define FONT_SIZE_HORIZ_INTERVAL 2

#define FONT_SIZE_VERTICAL_INTERVAL 2

typedef enum __draw_type_t
{
    draw_type_normal,
    draw_type_filter_color,
    draw_type_multiply,
} draw_type_t;
void disp_show_font_string_utf8_mid(uint8_t y, const char *str, uint8_t reserve_size);

void disp_show_user_string_middle(uint8_t start_x, int width, uint8_t start_y, char *p_string, uint8_t const *(*get_bmp)(char c));

void draw_on_chip_image(int x, int y, uint8_t const *const image);

void draw_on_chip_image_ext(int x, int y, uint8_t const *const image, draw_type_t type);

// void draw_on_chip_image_filter_color(int x, int y, uint8_t const *const image);

void draw_on_chip_gray_image(int x, int y, uint8_t const *const image, uint16_t color_base);

void draw_on_chip_gray_gif_array(int x, int y, uint8_t const *const *const image_array, uint32_t array_size, uint16_t color_base);

void draw_on_chip_gray_gif_array_filter_color(int x, int y, uint8_t const *const *const image_array, uint32_t array_size, uint16_t color_base);

void draw_on_chip_gif_array(int x, int y, uint8_t const *const *const image_array, uint32_t array_size);

void draw_on_chip_gif_array_filter_color(int x, int y, uint8_t const *const *const image_array, uint32_t array_size);

void draw_on_chip_unzip_gif_array(int x, int y, uint8_t const *const *const image_array, uint32_t array_size);

void draw_rectangle(int x0, int y0, int x1, int y1, uint16_t color);

void draw_rectangle_empty(int x0, int y0, int x1, int y1, uint16_t color);

void draw_on_chip_gradients_image(int x, int y, uint8_t const *binary_image, uint16_t forecolor_start, uint16_t forecolor_end);

void draw_on_chip_unzip_gradients_image(int x, int y, uint8_t const *binary_image, uint16_t forecolor_start, uint16_t forecolor_end, uint16_t backcolor);

void draw_point(int x, int y, uint16_t color);

int draw_on_chip_image_num_center(int num, int x0, int y0, int x1, int y1, uint8_t const *const *const num_image_array, int num_width, int num_interval, draw_type_t type);

void draw_horizontal_line(int x0, int x1, int y, uint16_t color);

void draw_vertical_line(int x, int y0, int y1, uint16_t color);

uint16_t get_filter_color(uint16_t color1, uint16_t color2);

void draw_on_chip_gray_image_filter_color(int x, int y, uint8_t const *const image, uint16_t color_base);

void draw_on_chip_unzip_gradients_image_with_back_ground(int x, int y, uint8_t const *const image, uint16_t forecolor, uint16_t backcolor_start, uint16_t backcolor_end);

void draw_on_chip_unzip_image(int x, int y, uint8_t const *const binary_image);

void draw_on_chip_unzip_image_with_forecolor(int x, int y, uint8_t const *const binary_image, uint16_t forecolor);

int draw_off_chip_string_calculate(int x1, int y1, int x2, int y2, uint16_t const *unicode_str, uint16_t reserve_size);

uint32_t draw_off_chip_string(int x1, int y1, int x2, int y2, uint16_t const *unicode_str, uint16_t reserve_size, int16_t *align_type);

int draw_on_chip_image_num(int num, int x, int y, uint8_t const *const *const num_image_array, int num_width, int num_interval, draw_type_t type);

int draw_on_chip_image_num_with_digits(int num, int num_digits, int x, int y, uint8_t const *const *const num_image_array, int num_width, int num_interval, draw_type_t type);

uint8_t get_num_digit(int num);

// -1 false
void draw_on_chip_unzip_image_rotate(const unsigned char *p_image, uint16_t ignore_color, uint32_t centre_xy, uint32_t centre_set_xy, uint16_t degree, int solid_colour, bool transparency_by_white);
